#include "guize.h"
#include "ui_guize.h"
#include "form.h"
#include "ui_form.h"
#include<qrect.h>
#include<qtimer.h>
#include<QKeyEvent>
#include<QDebug>
#include<QFont>
#include<QPixmap>
#include<QMovie>
#include<widget.h>
#include<QBitmap>
#include<form.h>
guize::guize(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::guize)
{
    ui->setupUi(this);
    this->setGeometry(QRect(200,200,800,310));
    this->resize( QSize( 670, 350));   //调整对话框初始大小
}

guize::~guize()
{
    delete ui;
}
void guize::paintEvent(QPaintEvent *event){//update()或程序第一次启动时自动执行，用于画图
    QPainter painter(this);
    painter.drawRect(0,0,670,350); //画矩形，相对于窗体的起点坐标（15，15），大小260*260
    painter.drawPixmap(0,0,670,350,QPixmap(":/myimg/picture/guize.png"));

    ui->pushButton->setStyleSheet(tr("background-image: url(:/myimg/picture/666.png);"));
    ui->pushButton->setFixedSize(QPixmap(":/myimg/picture/666.png").size());
    ui->pushButton->setMask(QPixmap(":/myimg/picture/666.png").mask());


}

void guize::on_pushButton_clicked()
{
    Form *h=new Form;
    h->show();
}

